home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / html / src / gcc.src < prev    next >
Text File  |  1998-07-28  |  5KB  |  94 lines

  1. @@@STARTPACK(gcc;Integrated GNU Compilation System)
  2.  
  3. @@@OSR5DIST(http://www.sco.com/skunkware/osr5/devtools/gcc/)
  4. @@@UW2DIST(http://www.sco.com/skunkware/uw7/devtools/gcc/)
  5. @@@SOURCE(ftp://prep.ai.mit.edu/pub/gnu/)
  6.  
  7. <P>The GNU C Compiler (gcc) is an advanced optimizing compiler for C, C++
  8. and Objective C. On OpenServer, this version of gcc can generate both
  9. COFF and ELF binaries from within a single compiler. Use the <TT>-melf</TT>
  10. flag to turn on ELF mode. By default, the compiler is always in COFF mode.
  11. On UnixWare, gcc always generates ELF binaries. </P>
  12.  
  13. <P>On Skunkware 98, the "Gcc" package is an "Integrated GNU C Compilation
  14. System" containing both the "production quality" GNU C Compiler and the
  15. experimental EGCS GNU C Compiler from Cygnus. When installing the Gcc package
  16. off of Skunkware 98, both of these compilers are installed
  17. and co-exist. By default, the FSF gcc will be used.
  18. The system wide default can be set in the file /etc/default/gcc by setting
  19. the PREFERRED_GCC variable to either /usr/local/lib/front-fsf or
  20. /usr/local/lib/front-egcs. An individual developer can over-ride the system
  21. wide default by setting and exporting PREFERRED_GCC in her environment.
  22. <P>
  23. Skunkware 98 contains gcc version 2.7.2.3 and egcs version 1.0.2.
  24. Many of the packages contained in Skunkware 98
  25. were built with the GNU C Compiler.</P>
  26.  
  27. <P>For the UnixWare compiler (and the OpenServer compiler in ELF mode),
  28. there are a few switches which developers may be interested in. All of
  29. these switches are covered in the GCC documentation, this is just a brief
  30. summary: </P>
  31.  
  32. <UL>
  33. <LI><TT>-fPIC</TT> - generate position independent code. This is used when
  34. creating shared libraries. </LI>
  35.  
  36. <LI><TT>-shared</TT> - used during linking. This will create a shared library.
  37. For example, the command <TT>gcc -shared -o libfoo.so *.o</TT> will link
  38. in all of the object files in the currently directory and correctly construct
  39. a shared library called <TT>libfoo.so</TT>. When using this option, you
  40. may want to check the man pages on <TT>ld</TT> for the usage of the <TT>-h</TT>
  41. and <TT>-Bexport</TT> options. <I>NOTE:</I> in order to pass the <TT>-Bexport</TT>
  42. flag to the linker, you need to invoke gcc with <TT>gcc -Wl,-Bexport</TT>.
  43. This is because the <TT>-B</TT> flag has special significance to gcc. The
  44. <TT>-Wl</TT> flag is used to pass arguments to the linker. Consult the
  45. gcc documentation for further details. </LI>
  46.  
  47. <LI><TT>-m486</TT> - turn on 486 specific optimizations. This option will produce
  48. code which can take advantage of specific 486 instructions, and which result
  49. in a code speed increase on 486 and later processors. On original 386 processors,
  50. there is a very negligible speed decrease. The code generated will still
  51. function properly on the 386. </LI>
  52. </UL>
  53.  
  54. <P>On OpenServer release 5.0.4, be careful when invoking gcc as a linker
  55. if you use gcc specific flags. Be especially careful with mixing gcc specific
  56. flags when using the <TT>-s</TT> option. This can cause the 5.0.4 linker
  57. to core dump. For example, the command line <TT>gcc -m486 -fomit-frame-pointer
  58. -Wall -s -o foo *.o</TT> is bad, whereas the command line <TT>gcc -s -o
  59. foo *.o</TT> is good. The gcc specific flags <TT>-fomit-frame-pointer -Wall</TT>
  60. (used only as an example here) confuse the 5.0.4 linker. </P>
  61.  
  62. <H3>Users of the old GDS (OSR5 only)</H3>
  63.  
  64. <P>For users of the GDS, <A HREF=http://www.sco.com/skunkware/gds>
  65. as shipped on Skunkware 96</A>, or for users who have
  66. downloaded the GDS from the SCO ftp site, life is a little different with
  67. this release of GCC.Firstly, the <TT>-b elf</TT> flag has been replaced
  68. with <TT>-melf</TT>. Secondly, the <TT>-K PIC</TT> option has been replaced
  69. with the <TT>-fPIC</TT> option. This is to ensure compatibility with all
  70. other version of the GNU C Compiler. Thirdly, no assemblers are provided,
  71. as described below. </P>
  72.  
  73. <P>With this release of GCC, no assembler is provided, and the GDS is no
  74. longer one large package, but rather a collection of smaller packages.
  75. However, installing all of the tools found in this section of Skunkware
  76. will be at least the equivalent of the GDS, if not more. For people using
  77. SCO OpenServer release 5.0.0 or release 5.0.2 who are not licensed development
  78. system users, you will need to install not only the linkers and libraries
  79. package, but also the assembler from the development system package.
  80. #if 0
  81. For more information on how to do this, click <A HREF="osr5as.html">here</A>.
  82. #endif
  83. If you have the SCO OpenServer Development System package installed, you
  84. do not need to do anything extra in order to use gcc. </P>
  85.  
  86. <P>For people running OpenServer release 5.0.4 or later, the linkers and
  87. libraries package already contains the SCO assemblers. For licensed SCO
  88. OpenServer Development System users, you can safely install gcc and all
  89. of these development system utilities without impacting your existing installed
  90. development system at all. </P>
  91.  
  92. @@@ENDPACK
  93.  
  94.